package com.forum.module.blog.controller.article.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;

/**
 * 功能:
 * 作者:ouyzh
 * 日期:2025/3/2 18:40
 */
@Schema(description = "博客管理 - 文章创建/修改 请求视图对象")
public class ArticleSaveReqVO {
    @Schema(description = "编号", example = "1024")
    private Long id;

    @Schema(description = "作者编号", example = "1")
    private Long userId;

    @Schema(description = "文章标题", example = "第一篇文章")
    @NotBlank(message = "文章标题不能为空")
    @Size(max = 50, message = "文章标题最大长度为50")
    private String title;

    @Schema(description = "文章摘要", example = "文章")
    private String summary;

    @Schema(description = "文章内容", example = "我发布了第一篇文章，真开心")
    private String content;

    @Schema(description = "文章封面图URL", example = "http://127.0.0.1:80/test.jpg")
    private String coverImage;

    @Schema(description = "文章分类编号", example = "1")
    private Long categoryId;

    @Schema(description = "文章状态（0：草稿 1：发布 2：审核中）", example = "1")
    private Integer status;

    @Schema(description = "浏览量", example = "100")
    private Long views;

    @Schema(description = "点赞数", example = "132")
    private Long likes;

    @Schema(description = "评论数", example = "321")
    private Long comments;

    public Long getId() {
        return id;
    }

    public ArticleSaveReqVO setId(Long id) {
        this.id = id;
        return this;
    }

    public Long getUserId() {
        return userId;
    }

    public ArticleSaveReqVO setUserId(Long userId) {
        this.userId = userId;
        return this;
    }

    public String getTitle() {
        return title;
    }

    public ArticleSaveReqVO setTitle(String title) {
        this.title = title;
        return this;
    }

    public String getSummary() {
        return summary;
    }

    public ArticleSaveReqVO setSummary(String summary) {
        this.summary = summary;
        return this;
    }

    public String getContent() {
        return content;
    }

    public ArticleSaveReqVO setContent(String content) {
        this.content = content;
        return this;
    }

    public String getCoverImage() {
        return coverImage;
    }

    public ArticleSaveReqVO setCoverImage(String coverImage) {
        this.coverImage = coverImage;
        return this;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public ArticleSaveReqVO setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
        return this;
    }

    public Integer getStatus() {
        return status;
    }

    public ArticleSaveReqVO setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public Long getViews() {
        return views;
    }

    public ArticleSaveReqVO setViews(Long views) {
        this.views = views;
        return this;
    }

    public Long getLikes() {
        return likes;
    }

    public ArticleSaveReqVO setLikes(Long likes) {
        this.likes = likes;
        return this;
    }

    public Long getComments() {
        return comments;
    }

    public ArticleSaveReqVO setComments(Long comments) {
        this.comments = comments;
        return this;
    }
}
